/*********************
 * J O B   R U L E S *
 *********************/

/* Chế độ ăn cho người lao động trí óc */
rule(
	'JOBR01a',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(calorie(X), normal)]),
	rhs(av(like_recipe(X), true), 0.45)
).
rule(
	'JOBR01b',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(calorie(X), high)]),
	rhs(av(like_recipe(X), true), 0.4)
).
rule(
	'JOBR01c',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(fat(X), normal)]),
	rhs(av(like_recipe(X), true), 0.4)
).
rule(
	'JOBR01d',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(protein(X), normal)]),
	rhs(av(like_recipe(X), true), 0.4)
).
rule(
	'JOBR01e',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(minerals(X), high)]),
	rhs(av(like_recipe(X), true), 0.45)
).
rule(
	'JOBR01f',
	lhs([av(job, Y), av(nature_job(Y), intellectual), av(vitamins(X), high)]),
	rhs(av(like_recipe(X), true), 0.4)
).

/* Chế độ ăn cho người lao động chân tay */
rule(
	'JOBR02a',
	lhs([av(job, Y), av(nature_job(Y), manual), av(calorie(X), normal)]),
	rhs(av(like_recipe(X), true), 0.4)
).
rule(
	'JOBR02b',
	lhs([av(job, Y), av(nature_job(Y), manual), av(calorie(X), high)]),
	rhs(av(like_recipe(X), true), 0.45)
).

rule(
	'JOBR02a',
	lhs([av(job, Y), av(nature_job(Y), manual), av(glucose(X), high)]),
	rhs(av(like_recipe(X), true), 0.45)
).
rule(
	'JOBR02b',
	lhs([av(job, Y), av(nature_job(Y), manual), av(protein(X), high)]),
	rhs(av(like_recipe(X), true), 0.4)
).

/* JOB FACTS */
% Intellectual thì ăn bổ não: Khoáng chất, rau
fact(av(nature_job(teacher), intellectual), 1).
fact(av(nature_job(engineer), intellectual), 1).
fact(av(nature_job(student), intellectual), 1).
fact(av(nature_job(architect), intellectual), 1).
fact(av(nature_job(doctor), intellectual), 1).
% Manual thì ăn bổ thịt: Protein, chất béo
fact(av(nature_job(builder), manual), 1).
fact(av(nature_job(porter), manual), 1).
fact(av(nature_job(guard), manual), 1).